home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / Tabloid 1.1 (US) / Tabloid 1.1 (US).rsrc / HELP_5635 next >
Encoding:
Text File  |  1996-01-08  |  7.3 KB  |  126 lines

  1.  
  2.  
  3.                                               Tabloid 1.1
  4.  
  5.                                           by Frédéric RINALDI
  6.  
  7. DESCRIPTION
  8.   Tabloid XCMD displays a spreadsheet like XWindoid, with multiple cells and columns.
  9.  
  10. SYNTAX
  11.    Tabloid <WName>[,<List>[,<WStyle>[,<X,Y[,Z,T]>][,<NO|ONE|CON|DIS>]
  12.                 [,<cell(s)>][,<textFont[,textSize]>][,<textAlign>][,<frame>]]
  13.  
  14. PARAMETERS
  15.    Only first param is needed. Order of params 3 to 7 doesn't matter, since the XCMD is able to recognize them.
  16.  
  17.    <WName> is a string giving the windoid name. Many windoids can be opened by using different names.
  18.  
  19.    <List> is a comma/return delimited string that will be displayed. Line separator is return, column is comma.
  20.  
  21.    <WStyle> is a string defining the window style. Allowed styles are : plain, zoom, roundRect, rect, shadow, windoid, windoidZoom, bigWindoid, bigWindoidZoom, Rinaldoid, RinaldoidZoom (Rinaldoid is the same as windoid, except that it displays the window title). All window styles are floating, except plain, zoom and roundRect. A windoid or Rinaldoid style window will have small scrollbars, while other styles will use standard size. Default is RinaldoidZoom if Rinaldoid WDEF resource is present, windoidZoom if not found.
  22.  
  23.    <X,Y[,Z,T]> will be a point or a rect, and will define position and/or size of the windoid. Coordinated are card-relative. If omitted, windoid will appear with standard size at "0,10".
  24.  
  25.    <NO|ONE|CON|DIS> defines the selection mode (no selection, one at a time, may but adjacent, many disjoint). Default is ONE.
  26.  
  27.    <cell(s)> is a comma separated list of cell coordinates. Each cell coordinate is a string of two integers separated by space, giving line and column number of the cell ("<line>_<column>[...,<line>_<column>]"). It defines the selected cells(s) when the windoid appears. 
  28.    Default is "1 1", but "0 0" can be used to have no selection at start.
  29.  
  30.    <textFont[,textSize]> is the name of font and its size to use. Default is Geneva 10.
  31.  
  32.    <textAlign> is the text alignment in the cells (left, center, right). Default is "left".
  33.  
  34.    <frame> is a boolean telling if the cells must be framed or not. Default is true, but frame appears only if Tabloid LDEF is present in resource fork.
  35.  
  36.    Using "!" and "?" as parameter will return an online help (resp. copyright and syntax).
  37.  
  38. USING
  39.    Tabloid is stand alone, no linked resource is needed. Meanwhile, this stack contains a LDEF, WDEF and CDEF resources that are recognized by the XCMD if present. 
  40.    The LDEF allows to have framed cells like in a spreadsheet, vertical centering of text in cells and text alignmenet. The WDEF allows to have an enhanced windoid-type window displaying title, while the CDEF is useful to get nice-looking scroll arrows for small scroll bars. So, these resources are optional, and for aesthetic purpose only. If you copy them, their ID can be set to any value but don't change their name.
  41.  
  42. Hint:
  43.   If you use a rect ot shadow style window, placing it on a card can simulate a smart HyperCard spreadsheet field.
  44.  
  45.    If no rectangle param is used, the size of the window will be set according to maximum number of lines and columns contained in the list. The cells have all the same size which is automatically calculated according to the longest contained string.
  46.  
  47.   Clicking on cells(s) in the windoid sends a "TabloidSelect" message followed by the clicked word(s) and the Tabloid name. This message can be trapped using a handler :
  48.  
  49.      on TabloidSelect What,Where
  50.        if  Where is "MyList" and What is ...
  51.      end TabloidSelect
  52.  
  53. Note:
  54.    in order to avoid HyperCard's confusion, existing quotes in What param are automatically changed to single quote.
  55.  
  56.    When a windoid is opened, the "openTabloid" message is sent, followed by the windoid name. This allows to define window properties before it is shown, since the message can be trapped using a handler :
  57.  
  58.      on openTabloid Which
  59.        if Which is "MyWindow" then...
  60.      end openTabloid
  61.  
  62.    When a windoid is close, the "closeTabloid" message is sent, followed by the windoid name. This message can be trapped using a handler :
  63.  
  64.      on closeTabloid Which
  65.        if Which is "MyWindow" then...
  66.      end closeTabloid
  67.  
  68. Hint:
  69.    the card script contains a "on ControlKey" handler that allows selection of first matching cell when typing a key in conjunction with control key. Moreover, while holding the control key down, the arrow keys allow to move in the list, return or enter to simulate a double-clic.
  70.  
  71.    It is possible to send any string to search for to the window using :
  72.                   send "string" to window <WName>
  73.    If the string is found, it will be highlighted int the window. Look for "on controlKey" handler in the card script, type Control+Key to try it.
  74.  
  75.    The lockText property define the behaviour of the window. Default value is TRUE, meaning that a click on a cell selects it. When cursor is over window, holding Option key (or having lockText set to FALSE)  allows to change cell size by dragging or edit their content. The cursor's shape tells exactly what can be done.
  76.    One in editing mode, cell is framed and moving around is possible using Tab or Return key with or without Shift key (validation). To exit editing, type Enter (validation) or Escape key (cancelling), or click in any other cell.
  77.  
  78.    Setting properties involving cell size also resizes the window to keep previously visible cell still visible.
  79.  
  80. PROPERTIES
  81.    Like any XWindow, Tabloid has properties that can be get and set thru HyperTalk. 
  82.   “properties of window "name"” will return an item list of all allowed properties :
  83.    • loc                  : windoid's position according to card
  84.    • visible            : windoid's visibility
  85.    • text                : windoid's text
  86.    • rect                : windoid's position and size according to card
  87.    • selectedCell    : cell(s) currently selected
  88.    • selectionMode : selection mode (NO|ONE|CON|DIS)
  89.    • frame             : cell frame (true|false)
  90.    • columnWidth   : width of columns in pixels
  91.    • rowHeight      : height of rows in pixels
  92.    • lockText         : locking/unlocking cells
  93.    • textFont         : font name
  94.    • textSize         : font size
  95.    • textAlign        : font alignment
  96.  
  97. ERRORS
  98.    If an error occurs, Tabloid can return :
  99.      "Error : Missing window name"
  100.      "Error : Duplicate window name"
  101.      "Error : Empty parameter"
  102.      "Error : Bad Font size"
  103.      "Error : Unknown font name"
  104.      "Error : Unrecognized parameter #xx"
  105.      "Error : Unable to create XWindow"
  106.      "Error : XWindows not implemented"
  107.      "Error : Couldn't create list"
  108.  
  109. VERSION HISTORY
  110. 1.1
  111. • Added properties columnWidth, rowHeight, lockText, textFont, 
  112.    textSize & textAlign
  113. • Updated LDEF resource (1.1)
  114. • Added editing feature
  115. • Added cell sizing
  116. • Fixed window update
  117. • fixed window visible state when switching under MultiFinder
  118. --------------------------------------------------------------------
  119.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  120.  
  121.                    Tabloid XCMD, © Frederic Rinaldi, 1989…1993.
  122.  
  123.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  124.  
  125. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  126.                Internet : RINALDI1@APPLELINK@APPLE.COM